

<template>

  <el-container style="height: 870px;width: 100%">
    <el-header style="height: 10%;background-color: rgb(72,209,204);">
      <div style="background-color: rgb(72,209,204);width: 33%;height: 100%;float: left"></div>
      <div style="background-color: rgb(72,209,204);width: 34%;height: 100%;float: left"> <p style="color: #91959c;font-size: 23px;line-height: 23px;font-weight: bold;height: 40px">子项目招标情况</p></div>
      <div style="background-color: rgb(72,209,204);width: 33%;height: 100%;float: left" >  <el-button type="danger" plain  @click="jump('Index')">返回主页</el-button></div>
    </el-header>
    <el-container style="height: 100%">
      <el-main style="padding: 0px">



        <div style="background-color:#ebeeea; ">
          <div style="width: 60%;margin-left: 20%;background-color: white">
            <div style="height: 300px;width: 100%">
              <div style="width: 50%;height: 300px;float: left;">
                <img :src="this.photoUrl" style="width: 300px;height: 300px;margin-left: 25%">
              </div>
              <div style="width: 50%;height: 300px;float: left">
                <div  style="width: 400px;height:300px" >
                  <p  style="width: 400px;word-wrap: break-word;height: 25px;line-height: 10px">官方报价：  {{price}}</p>
                  <p  style="width: 400px;word-wrap: break-word;height: 300px;line-height: 20px" > 项目要求:   {{introduce}} <a :href=this.projectDoc ><p>点我下载项目详细文档</p></a>    </p>
                </div>
                <!--<p style="white-space: pre-wrap;">简介：{{introduce}}</p>-->
              </div>
            </div>
            <div style="width: 100%;height: 40px;background-color:#ebeeea"></div>

            <div style="width: 100%">
              <span style="height: 60px;weight:100%;margin-bottom: 40px;"><p style="font-style: normal;font-size: large;">申请工作室展示</p></span>
              <el-table :data="teamData" style="width: 100%;margin-top: 30px" height="250">
                <el-table-column prop="wid" label="工作室编号" width="180"></el-table-column>
                <el-table-column prop="tname" label="工作室名" width="180"></el-table-column>
                <el-table-column prop="price" label="报价"></el-table-column>
                <el-table-column prop="dateee" label="预定项目完成日期"></el-table-column>
              </el-table>
            </div>

            <div style="width: 100%;height: 40px;background-color:#ebeeea"></div>







            <div style="margin-top: 40px">
              <span  style="margin-top: 80px;margin-left: 0%">
                <el-button  type="success" round @click="jumpppp('TeamApply')" >申请</el-button>
              </span>
            </div>
          </div>
        </div>





      </el-main>
    </el-container>
  </el-container>
</template>
<style >
  .el-menu-vertical-demo:not(.el-menu--collapse) {
    width: 200px;
    min-height: 400px;
  }

  .el-header, .el-footer {
    color: #7c235b;
    text-align: center;
    line-height: 60px;
  }

  .el-aside {
    background-color: #c0c3bf;
    color: #333;
    line-height: 200px;
    font-size: 25px;
    font-weight: bold;
    text-align: left;
  }

  .el-main {
    background-color: #e0e4eb;
    color: #333;
    text-align: center;
    line-height: 60px;
  }

  body > .el-container {
    margin-bottom: 40px;
  }
  . hh{
    height: 56px;
    line-height: 56px;
    position: relative;
    -webkit-box-sizing: border-box;
    white-space: nowrap;
  }
  .el-container:nth-child(5) .el-aside,
  .el-container:nth-child(6) .el-aside {
    line-height: 260px;
  }
  .el-menu-item, .el-submenu__title {
    height: 56px;
    line-height: 56px;
    position: relative;
    -webkit-box-sizing: border-box;
    white-space: nowrap;
    padding-left: 100px;
    /*list-style-position: initial;*/
    list-style-type: initial ;
  }
  .el-container:nth-child(7) .el-aside {
    line-height: 320px;
  }
</style>






























<script>
  export default {
    data() {
      return {
        ff:'',
        id:'',
        introduce:'',
        photoUrl:'',
        price:'',
        projectDoc:'',
        tableData1: [
          { id:'',
            workroomId:'',
            workroomName:'',
            price:'',
            timeLimit:'',
          }
        ],
        teamData:[]
      }
    },
    mounted: function () {
      this.id= this.$route.query.mallCode
      axios.post('/user/selectTeamDemandById',{
        id: this.id,
        wid: this.id
      }).then((response) => {
        if(response.data!=""){

          var e=response.data
          console.log(e)
          this.id=e.id
          this.price=e.price
          this.introduce=e.demand
          this.projectDoc=e.doc
          this.photoUrl=e.photo






        }
        else{

        }

      }).catch((response)=>{
        this.$notify.error({
          title: '',
          message: '错误'
        });
      })


      axios.post('/user/selectTeamApply',{
       tdid: this.id,
        wid: this.id
      }).then((response) => {
        if(response.data!=""){





          var ee=response.data
         this.teamData=ee




        }
        else{
          // this.$notify.error({
          //   title: '没有人申请该项目',
          //   message: response.data.message,
          //   type: 'warning',
          //   duration:0
          // });
        }

      }).catch((response)=>{
        this.$notify.error({
          title: '',
          message: '错误'
        });
      })



      axios.post('/user/selectTeamByPid',{
        pid: this.id,
        states: this.id
      }).then((response) => {
        if(response.data!=""){


          let ee=response.data

          this.teamData=ee


          console.log(this.teamData)
          // var user= JSON.parse(window.sessionStorage.getItem("user"));
          // var jj=user.role
          //
          // if(jj.includes("workroom")){
          //   this.ff=true
          //
          // }
          // var e=response.data
          // this.projectName=e.projectName
          // this.lable=e.lable
          // this.price=e.price
          // this.style=e.style
          // this.introduce=e.introduce
          // this.projectDoc=e.projectDoc
          // this.photoUrl=e.photoUrl
          // var a=e.timeLimit
          // var b= a.split("T")
          // this.timeLimit=b[0]





        }
        else{
          // this.$notify.error({
          //   title: '项目未被找到',
          //   message: response.data.message,
          //   type: 'warning',
          //   duration:0
          // });
        }

      }).catch((response)=>{
        this.$notify.error({
          title: '',
          message: '错误'
        });
      })





    },
    methods: {

      jump(path){

        this.$router.push({
          path: '/ProjectApply',
          query: {
            mallCode: this.id

          }
        })

      },
      jumpppp(path){

        this.$router.push({
          path: '/TeamApply',
          query: {
            mallCode: this.id

          }
        })

      },
      jumpp(path){

        this.$router.push({
          path: '/TeamInfo',
          query: {
            mallCode: path

          }
        })

      },

      jumppp(path){
        var user= JSON.parse(window.sessionStorage.getItem("user"));
        var wid=user.id
        this.$router.push({
          path: '/TeamBuild',
          query: {
            pid: this.id,
            wid:wid

          }
        })

      },

    }
  }
</script>

<style scoped>

  .image {
    width: 100%;
    display: block;
  }

</style>
